<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>编辑编码类型</title>
    <link rel="stylesheet" href="${base}/static/res/manage/css/common.css">
    <link rel="stylesheet" href="${base}/static/res/manage/css/ec.css">
    <link rel="stylesheet" href="${base}/static/res/manage/css/list.css">
    <style type="text/css">
        .tablist {
            min-height: 350px;
        }
    </style>
    <script type="text/javascript" src="${base}/static/res/plugin/jquery/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="${base}/static/res/plugin/validator/jquery.validate.min.js"></script>
    <script type="text/javascript" src="${base}/static/res/admin/js/common.js"></script>
    [#include "/admin/include/plupload.ftl" /]
    <script type="text/javascript">
        $(function () {
            $("#inputForm").validate({
                rules: {
                    code: {
                        required: true,
                        maxlength: 30
                    },
                    codeName: {
                        required: true,
                        maxlength: 30
                    },
                    codeRemark: {
                        required: true,
                        maxlength: 100
                    },
                    orders: {
                        required: true,
                        digits: true
                    },
                    isEnabled: {
                        required: true
                    }
                },
                messages: {
                    code: {
                        maxlength: "最多只能输入30个字符"
                    },
                    codeName: {
                        maxlength: "最多只能输入30个字符"
                    },
                    codeRemark: {
                        maxlength: "最多只能输入100个字符"
                    }
                }
            });
            extPlupload("${base}", {btn: "icoBtn", fieldId: "codeIco"});
        });
    </script>
</head>
<body>
<form id="inputForm" action="save.jhtml" method="post">
    <input type="hidden" name="typeId" value="${codeType.id}"/>
    <div class="tab set arr">
        <h3><a href="add.jhtml">新建编码-${codeType.codeTypeName}</a></h3>
        <div class="tablist message">
            <table cellpadding="0" cellspacing="0">
                <tr>
                    <td><label>编码值<span class="cred">*</span></label></td>
                    <td>
                        <input type="text" name="code"/>
                    </td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td><label>编码名称<span class="cred"> * </span></label></td>
                    <td>
                        <input type="text" name="codeName"/>
                    </td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td><label>编码描述<span class="cred"> * </span></label></td>
                    <td>
                        <input type="text" name="codeRemark"/>
                    </td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td><label>排序<span class="cred"> * </span></label></td>
                    <td>
                        <input type="text" name="orders"/>
                    </td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td><label>ICON<span class="cred"> * </span></label></td>
                    <td>
                        <input id="codeIco" name="codeIco" type="text" placeholder="请上传100*400像素的图片" readonly="readonly"
                               class="uploadTxt"/>
                        <input id="icoBtn" type="button" value="上传" class="uploadBtn"/>
                    </td>
                    <td></td>
                    <td></td>
                </tr>
                <tr class="check">
                    <td><label>设置<span class="cred"> * </span></label></td>
                    <td colspan="3">
                        <label><input type="checkbox" name="isEnabled" value="true" checked/>可用</label>
                    </td>
                </tr>
            </table>
            <p class="save">
                <input type="submit" value="保存" class="red">
                <input type="button" value="取消" class="red" id="backButton">
            </p>
        </div>
    </div>
</form>
</body>
</html>